<%--
  Created by IntelliJ IDEA.
  User: dllo
  Date: 18/5/15
  Time: 下午5:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        .i {
            color: red;
        }

        .j {
            color: green
        }

        .result {
            color: blue;
        }
    </style>
</head>
<body>
<table>
        <%
        // i * j = i*j
        for (int i = 1; i < 10; i++) {
    %>
    <tr>
            <%

            for (int j = 1; j <= i; j++) {
                String result = j + "*" + i + "=" + j * i;
                //html代码
        %>
        <%--
<%--
这是jsp表达式,注意,直接写要输出的变量名,不严写分号
jsp 表达式 运行在HTML代码中 使用java代码的变量值
--%>
        <td>
            <span class="j"><%=j%></span> * <span class="i"><%=i%></span>
            = <span class="result"><%=i * j%></span></td>
        <%
            }
        %>
    </tr>
    <%
        }
    %>
</table>
</body>
</html>
